package edu.tamu.cse.teamproject1.Database;

/**
 * This is the Integer subclass of TupleElement
 *
 * @author Ben Unsworth
 * @since Release 0.1.0
 */
public class TupleIntegerElement extends TupleElement{
	/**
	 * constructor, defines the type and value of this TupleElement
	 * @param value
	 */
	public TupleIntegerElement(Integer value){
		tupleValue = value;
		tupleType = EnumColumnType.integer;
		size = 255;
	}
	
	/**
	 * Returns a casted Integer value of the tuple value
	 * @return the TupleElement value as an Integer
	 */
	@Override
	public Integer getValue(){
		return (Integer)tupleValue;
	}
	
	/**
	 * Defines the TupleElement value as an Integer
	 * @param value
	 */
	@Override
	public void setValue(Object value){
		tupleValue = (Integer)value;
	}
}
